<?php

namespace Projet\BackOfficeBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    public function indexAction()
    {
        return $this->render('BackOfficeBundle:Default:index.html.twig');
    }
	
	public function lesproduitsAction()
	{
		$em = $this->getDoctrine()->getManager();
		$entites = $em->getRepository('BackOfficeBundle:Produit')->findAll();
		
		return $this->render('BackOfficeBundle:Produit:lesproduits.html.twig', array('entities' => $entites));
	}
	
	public function lesutilisateursAction()
	{
		$em = $this->getDoctrine()->getManager();
		$entites = $em->getRepository('BackOfficeBundle:Utilsateur')->findAll();
		
		return $this->render('BackOfficeBundle:Utilsateur:lesutilisateurs.html.twig', array('entities' => $entites));
	}
	}